<?php

namespace App\Models;

use App\Events\FinancialFlow;
use App\Traits\Model as ModelTrait;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class CommonFinancialFlow extends Model
{
    protected $table='common_financial_flow';
    protected $dispatchesEvents = [
        'saving' => FinancialFlow::class,
        'saved' => FinancialFlow::class,        // 更新后联动save
    ];
    public static $type = [
        1001 => '订单支出',
        1002 => '订单收入',
        2001 => '充值收入',
        2002 => '提现支出',
        3001 => '退款支出',
        4001 => '线下支出',
        4002 => '线下收入'
    ];

    use HasFactory;
    use ModelTrait;
}
